﻿using System;
using System.Data;

namespace Smatime.Web.Models
{
    public class TotalOfMonth : BaseEntity
    {
        public long CompanyId { get; set; }
        public string TotalWorkDate { get; set; }
        public string Name { get; set; }
        public string StoreName { get; set; }
        public long StoreId { get; set; }
        public DateTime StampDate { get; set; }
        public string TotalWork { get; set; }
        public string TotalBeark { get; set; }
        public string TotalGoOut { get; set; }

        public override BaseEntity FromDataRow(DataRow row)
        {
            Id = (long) row["Id"];
            CompanyId = (long) row["CompanyId"];
            TotalWorkDate = row["TotalWorkDate"].ToString();
            Name = row["Name"].ToString();
            StoreName = row["StoreName"].ToString();
            StoreId = (long) row["StoreId"];
            StampDate = (DateTime) row["StampDate"];
            TotalWork = row["TotalWork"].ToString();
            TotalBeark = row["TotalBeark"].ToString();
            TotalGoOut = row["TotalGoOut"].ToString();

            return base.FromDataRow(row);
        }
    }
}